﻿using Ducu.BLL.Entity;
using Ducu.GLB.Global;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ducu.SRV.Query
{
    public static class OnBaseEntity
    {
        public static IQueryable<T> Page<T>(this IQueryable<T> source, Pager pager)
        {
            return source.Take(pager.Size).Skip((pager.Index - 1)*pager.Size);
        }
    }
}
